#pragma once

#include "BasicObject.h"

namespace BAA
{

	class PlanNode;
	class Action;
	class PlanNode:public BasicObject
	{
	public:
		PlanNode(const std::string name):BasicObject(name)
		{

		}

		~PlanNode()
		{
			// delete the children plan nodes.
			
		}

		void Create(Action * action)
		{
			mAction = action;

		}

		std::vector<std::vector<PlanNode*>*>* Children() { return &mChildren; }
		void Children(std::vector<std::vector<PlanNode*>*> val) { mChildren = val; }

		PlanNode * Parent() { return parent; }
		void Parent(PlanNode * val) { parent = val; }

		Action * GetAction() { return mAction; }
		void SetAction(Action * val) { mAction = val; }

	protected:

		PlanNode * parent;

		Action * mAction;
		
		// for each precondition, have an associated planNode.
		std::vector<std::vector<PlanNode*>*> mChildren;


	};// end class



}// end namespace
